<template>
  <div>
    <p>{{ title }}</p>
    <p v-for="item in user" :key="item">{{ item }}</p>
    <p>{{ msg }}</p>

    <button @click="$emit('sonEmit', 1, 'string', { name: '小强' })" emit触发父级组件绑定子组件上的函数></button>
  </div>
</template>

<script lang='ts'>
export default {
  name: 'vue',
}
</script>

<script lang='ts' setup>
import { ref, h, type Ref, isRef, reactive, isReactive, readonly, isReadonly, toRef, toRefs, unref, isProxy } from 'vue';
export interface Iuser {
  id?: number
  name: string,
  age: number,
  sex: string
}


const {
  title = '小船晃晃岁月长',
  user,
  msg
} = defineProps<{
  title?: string,
  user: Iuser,
  msg?: string
}>();


</script>

<style lang='scss'>
@use '@/assets/common.scss';
</style>
